package org.houor.office.word;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DocumentExport {

	public static void main(String[] args) throws UnsupportedEncodingException {

		Map<String, Object> dataMap = new HashMap<String, Object>();
		dataMap.put("GroupTitle", "河南科技学院新科学院");

		List<String> persons = new ArrayList<String>();
		for (int i = 0; i < 6; i++) {
			persons.add("p" + (i + 2));
		}

		dataMap.put("persons", persons);

		FreeMarkerDocumentHandler mdoc = new FreeMarkerDocumentHandler("/org/houor/utility/word");
		mdoc.generateDocument(dataMap, "GroupTitle.ftl", "E:/outFile.doc");
	}

}
